package com.wish.contract.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author lyk
 * @since 2022-08-19
 */
@Getter
@Setter
@TableName("t_contract")
public class Contract implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 合同编号
     */
    private String contractNo;

    /**
     * 开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    /**
     * 月租金
     */
    private BigDecimal monthRent;

    /**
     * 收款方式(押X付Y的X
     */
    private Integer depositType;

    /**
     * 收款方式（押X付Y的Y）
     */
    private Integer paymentType;

    private Integer houseId;

    /**
     * 租客id
     */
    private Integer renterId;

    /**
     * 房东id
     */
    private Integer landlordId;

    /**
     * 上一个合同的id
     */
    private Integer lastContractId;

    /**
     * 合同状态,"1:草稿\n2:已提交\n3:已解约\n4:已结束\n9:作废
     */
    private Integer contractState;

    private Integer delStatus;

    private Integer createdUserId;

    /**
     * 合同创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    private Integer updatedUserId;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;


}
